Skip to content

Conversation

@chiaco
Copy link

@chiaco chiaco commented Nov 19, 2025

The current code treats "no cached credentials" and "credentials about to expire" as the same condition. The problem is that it tries to refresh the soon-to-expire credentials, and blindly overrides the current value. This is a problem because the refresh can (and has failed on us), while the existing credentials would still otherwise have been valid. It overwrites the existing "good" credentials with a null value, when it didn't need to.

This pull request changes it so it only replaces the existing credentials only if the new credentials are actually valid.

The current code treats "no cached credentials" and "credentials about to expire" as the same condition. The problem is that it tries to refresh the soon-to-expire credentials, and blindly overrides the current value. This is a problem because the refresh can (and has failed on us), while the existing credentials would still otherwise have been valid. It overwrites the existing "good" credentials with a null value, when it didn't need to.

This pull request changes it so it only replaces the existing credentials only if the new credentials are actually valid.
@CLAassistant
Copy link

CLAassistant commented Nov 19, 2025

CLA assistant check
All committers have signed the CLA.

@chiaco
Copy link
Author

chiaco commented Nov 19, 2025

@huiguangjun Hey, I found your name as a reviewer in other recently merged pull requests. We've never met, but I was hoping you could take a look at this one. It's quick and easy to understand and review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants